const { ccclass, property, menu } = cc._decorator;

@ccclass
@menu('NativeFun/NativeFun')
export default class NativeFun extends cc.Component {

    @property(cc.Sprite)
    spr: cc.Sprite = null;

    start() {
        // init logic

        cc.assetManager.loadRemote(this.getUrl(), { ext: '.jpg' }, (err, texture: cc.Texture2D) => {
            this.spr.spriteFrame = new cc.SpriteFrame(texture);
        })
    }

    getUrl(): string {
        return ``
    }
}
